package com.glb.gilibuy.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * product
 * @author 
 */
@ApiModel(value="com.glb.gilibuy.entity.Product商品表")
@Data
public class Product implements Serializable {
    /**
     * id
     */
    @ApiModelProperty(value="id")
    private Long id;

    /**
     * 商品id
     */
    @ApiModelProperty(value="商品id")
    private String productId;

    /**
     * 商品名称
     */
    @ApiModelProperty(value="商品名称")
    private String productName;

    /**
     * 商品分类id
     */
    @ApiModelProperty(value="商品分类id")
    private String productCategoryId;

    /**
     * 商品价格
     */
    @ApiModelProperty(value="商品价格")
    private BigDecimal productPrice;

    /**
     * 商品介绍
     */
    @ApiModelProperty(value="商品介绍")
    private String productIntro;

    /**
     * 商品热度值
     */
    @ApiModelProperty(value="商品热度值")
    private BigDecimal productHeat;

    /**
     * 商品排序权重：0 - 999
     */
    @ApiModelProperty(value="商品排序权重：0 - 999")
    private Integer productSequence;

    /**
     * 商品库存数量
     */
    @ApiModelProperty(value="商品库存数量")
    private Integer productAmount;

    /**
     * 头图(地址)
     */
    @ApiModelProperty(value="头图(地址)")
    private String coverPic;

    /**
     * 图片(地址)
     */
    @ApiModelProperty(value="图片(地址)")
    private String pics;

    /**
     * 尺寸
     */
    @ApiModelProperty(value="尺寸")
    private String size;

    /**
     * 重量
     */
    @ApiModelProperty(value="重量")
    private String weight;

    /**
     * 销量(交易成功的订单总数)
     */
    @ApiModelProperty(value="销量(交易成功的订单总数)")
    private Integer saleCount;

    /**
     * 评论数(讨论数+评价数)
     */
    @ApiModelProperty(value="评论数(讨论数+评价数)")
    private Integer commentCount;

    /**
     * 是否为虚拟商品：0->否；1->是
     */
    @ApiModelProperty(value="是否为虚拟商品：0->否；1->是")
    private Integer isVirtual;

    /**
     * 创建时间
     */
    @ApiModelProperty(value="创建时间")
    private Date gmtCreate;

    /**
     * 更新时间
     */
    @ApiModelProperty(value="更新时间")
    private Date gmtModified;

    /**
     * 是否被删除：0->否；1->是
     */
    @ApiModelProperty(value="是否被删除：0->否；1->是")
    private Integer isDeleted;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Product other = (Product) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getProductId() == null ? other.getProductId() == null : this.getProductId().equals(other.getProductId()))
            && (this.getProductName() == null ? other.getProductName() == null : this.getProductName().equals(other.getProductName()))
            && (this.getProductCategoryId() == null ? other.getProductCategoryId() == null : this.getProductCategoryId().equals(other.getProductCategoryId()))
            && (this.getProductPrice() == null ? other.getProductPrice() == null : this.getProductPrice().equals(other.getProductPrice()))
            && (this.getProductIntro() == null ? other.getProductIntro() == null : this.getProductIntro().equals(other.getProductIntro()))
            && (this.getProductHeat() == null ? other.getProductHeat() == null : this.getProductHeat().equals(other.getProductHeat()))
            && (this.getProductSequence() == null ? other.getProductSequence() == null : this.getProductSequence().equals(other.getProductSequence()))
            && (this.getProductAmount() == null ? other.getProductAmount() == null : this.getProductAmount().equals(other.getProductAmount()))
            && (this.getCoverPic() == null ? other.getCoverPic() == null : this.getCoverPic().equals(other.getCoverPic()))
            && (this.getPics() == null ? other.getPics() == null : this.getPics().equals(other.getPics()))
            && (this.getSize() == null ? other.getSize() == null : this.getSize().equals(other.getSize()))
            && (this.getWeight() == null ? other.getWeight() == null : this.getWeight().equals(other.getWeight()))
            && (this.getSaleCount() == null ? other.getSaleCount() == null : this.getSaleCount().equals(other.getSaleCount()))
            && (this.getCommentCount() == null ? other.getCommentCount() == null : this.getCommentCount().equals(other.getCommentCount()))
            && (this.getIsVirtual() == null ? other.getIsVirtual() == null : this.getIsVirtual().equals(other.getIsVirtual()))
            && (this.getGmtCreate() == null ? other.getGmtCreate() == null : this.getGmtCreate().equals(other.getGmtCreate()))
            && (this.getGmtModified() == null ? other.getGmtModified() == null : this.getGmtModified().equals(other.getGmtModified()))
            && (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getProductId() == null) ? 0 : getProductId().hashCode());
        result = prime * result + ((getProductName() == null) ? 0 : getProductName().hashCode());
        result = prime * result + ((getProductCategoryId() == null) ? 0 : getProductCategoryId().hashCode());
        result = prime * result + ((getProductPrice() == null) ? 0 : getProductPrice().hashCode());
        result = prime * result + ((getProductIntro() == null) ? 0 : getProductIntro().hashCode());
        result = prime * result + ((getProductHeat() == null) ? 0 : getProductHeat().hashCode());
        result = prime * result + ((getProductSequence() == null) ? 0 : getProductSequence().hashCode());
        result = prime * result + ((getProductAmount() == null) ? 0 : getProductAmount().hashCode());
        result = prime * result + ((getCoverPic() == null) ? 0 : getCoverPic().hashCode());
        result = prime * result + ((getPics() == null) ? 0 : getPics().hashCode());
        result = prime * result + ((getSize() == null) ? 0 : getSize().hashCode());
        result = prime * result + ((getWeight() == null) ? 0 : getWeight().hashCode());
        result = prime * result + ((getSaleCount() == null) ? 0 : getSaleCount().hashCode());
        result = prime * result + ((getCommentCount() == null) ? 0 : getCommentCount().hashCode());
        result = prime * result + ((getIsVirtual() == null) ? 0 : getIsVirtual().hashCode());
        result = prime * result + ((getGmtCreate() == null) ? 0 : getGmtCreate().hashCode());
        result = prime * result + ((getGmtModified() == null) ? 0 : getGmtModified().hashCode());
        result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", productId=").append(productId);
        sb.append(", productName=").append(productName);
        sb.append(", productCategoryId=").append(productCategoryId);
        sb.append(", productPrice=").append(productPrice);
        sb.append(", productIntro=").append(productIntro);
        sb.append(", productHeat=").append(productHeat);
        sb.append(", productSequence=").append(productSequence);
        sb.append(", productAmount=").append(productAmount);
        sb.append(", coverPic=").append(coverPic);
        sb.append(", pics=").append(pics);
        sb.append(", size=").append(size);
        sb.append(", weight=").append(weight);
        sb.append(", saleCount=").append(saleCount);
        sb.append(", commentCount=").append(commentCount);
        sb.append(", isVirtual=").append(isVirtual);
        sb.append(", gmtCreate=").append(gmtCreate);
        sb.append(", gmtModified=").append(gmtModified);
        sb.append(", isDeleted=").append(isDeleted);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}